/**
 * meiguang8.com
 * Copyright (C) 2016-2019 All Rights Reserved.
 */
package com.yuanchuang.yp.mall.web.admin.user.service.impl;

import com.yuanchuang.yp.framework.common.FsBeanUtil;
import com.yuanchuang.yp.mall.web.admin.entity.AuthUserDO;
import com.yuanchuang.yp.mall.web.admin.user.mapper.AuthUserMapper;
import com.yuanchuang.yp.mall.web.admin.user.model.UserModel;
import com.yuanchuang.yp.mall.web.admin.user.service.IAuthUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * class_name: AuthUserServiceImpl
 * package: com.yuanchuang.yp.mall.web.admin.service.user.impl
 * describe: TODO
 * @author: yuanyuan.zhu
 * creat_date: 2019/7/12
 * creat_time: 12:01
 **/
@Service
public class AuthUserServiceImpl implements IAuthUserService {
    @Autowired
    private AuthUserMapper authUserMapper;

    /**
     * 获取后台用户信息
     *
     * @param authUserId
     * @return
     */
    @Override
    public UserModel getAuthUserInfo(Long authUserId) {
        AuthUserDO authUserDO = authUserMapper.selectById(authUserId);
        UserModel target = new UserModel();
        FsBeanUtil.copy(authUserDO, target);
        return target;
    }
}
